<template>
  <div class="advert-item">
    <div class="item-icon">
      <img class="img" :src="data.image"/>
    </div>
    <div class="item-content">
      <div class="item-row">
        <div class="item-name">{{data.title}}</div>
        <div class="item-num">今日已有{{data.apply_loans}}人申请</div>
      </div>
      <div class="item-row sub">
        <div class="item-case" v-html="data.success_case"></div>
        <div class="item-text">已到账</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object,
      default: () => {
        return {}
      }
    }
  }
}
</script>
<style lang="scss" scoped>
@import '~@/scss/base.scss';
.advert-item {
  display: flex;
  background: white;
  align-items: center;
  height: 60px;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, .1);
  padding: $base-padding;
  margin-bottom: $base-padding;
  .item-content {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-grow: 1;
    height: 100%;
    font-size: 12px;
    margin-left: $base-padding;
    .sub {
      color: $sub-color;
    }
    .item-row {
      width: 100%;
      display: flex;
      justify-content: space-between;
      .item-name{
        font-size: 1.25em;
      }
    }
  }
}
.img{
  width: $icon-size;
  height: $icon-size;
  border-radius: 50%;
}
</style>
